<template>
  <!-- 首页：右边部分 -->
  <div class="right">
    <!-- 个人信息 -->
    <el-card class="me">
      <template #header>
        <div class="card-header">
          <span>我的信息</span>
        </div>
      </template>
      <div>
        <ul>
          <li>张三的网站</li>
          <li>张三的网站</li>
          <li>张三的网站</li>
        </ul>
        <p>人生格言: 拼命往前冲！</p>
      </div>
      <div>
        <picture>二维码</picture>
      </div>
    </el-card>

    <!-- 搜索-->
    <el-card class="search">
      <div>
        <el-input v-model="search" placeholder="请输入关键字" clearable />
        <el-button :icon="Search" />
      </div>
    </el-card>

    <!-- 栏目分类 -->
    <el-card class="category">
      <template #header>
        <div class="card-header">
          <el-icon>
            <Reading />
          </el-icon>
          <span>栏目分类</span>
        </div>
      </template>
      <ul>
        <li v-for="(item, index) in 6">
          <el-icon>
            <Memo />
          </el-icon>
          <span>随便怎么写{{ item + index }}</span>
          <span class="cnt">200</span>
        </li>
      </ul>
    </el-card>

    <!-- 标签 -->
    <el-card class="flag">
      <template #header>
        <div class="card-header">
          <span>标签</span>
        </div>
      </template>
      <div>
        <el-button-group>
          <el-button v-for="(item, index) in 10">{{item-index}}电商</el-button>
        </el-button-group>
      </div>
    </el-card>

    <!-- 友情链接 -->
    <el-card class="link">
      <template #header>
        <div class="card-header">
          <span>友情链接</span>
          <span>申请</span>
        </div>
      </template>
      <div>
        <ul>
          <li>张三的网站</li>
          <li>张三的网站</li>
          <li>张三的网站</li>
        </ul>
      </div>
    </el-card>

    <!-- 统计 -->
    <el-card class="stat">
      <template #header>
        <div class="card-header">
          <span>统计</span>
        </div>
      </template>
      <div>
        <ul>
          <li>张三的网站</li>
          <li>张三的网站</li>
          <li>张三的网站</li>
        </ul>
      </div>
    </el-card>

  </div>
</template>

<script setup lang='ts'>
import { ref } from "vue"
import { Search } from '@element-plus/icons-vue'
let search = ref<string>()
</script>
<style scoped lang="scss">
.right {
  display: flex;
  flex-direction: column;

  .card-header {
    font-size: 16px;
    font-weight: 1000;

    .el-icon {
      margin: 5px;
    }
  }

  .el-card {
    width: 300px;
    margin-bottom: 5px;
  }

  .search {
    display: flex;

    div {
      display: flex;
      flex-direction: row;

      div:nth-child(1) {
        margin-right: 5px;
      }
    }
  }

  .category {
    ul {

      li {
        display: flex;
        justify-content: flex-start;
        line-height: 26px;
        align-items: center;
        padding: 5px 10px;
        font-size: 16px;

        .el-icon {
          margin-right: 10px;
        }

        span:nth-child(3) {
          width: 40px;
          height: 18px;
          line-height: 18px;
          margin-left: auto;
          border: 1px solid #eee;
          text-align: center;
          background-color: #eee;
          color: #777;
          font-size: 12px;
        }

        // .cnt{margin-left:auto;}
      }
    }
  }

  .flag {
    div {
      display: flex;
      flex-wrap: wrap;

      .el-button {
        margin-right: 3px;
        margin-bottom: 3px;
      }
    }
  }

  .link {
    div {
      display: flex;
      flex-wrap: wrap;

      .el-button {
        margin-right: 3px;
        margin-bottom: 3px;
      }
    }
  }
}
</style>